<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>WebSocket Demo - Graceful Degradation with custom poll params</title>
</head>
<body>

	<form id="chat" action="">
		<p><input id="inputMsg" type="text" /></p>
		<ul id="messages"/>
	</form>	
	
	<script src="js/jquery-1.4.2.js" type="text/javascript"></script>
	<script src="js/DemoChat.js" type="text/javascript"></script>
    <script src="js/jquery.gracefulWebSocket-0.1.js" type="text/javascript"></script>
	
	<script type="text/javascript">
	
		(function ($) {
	
			var chat = new demoNamespace.DemoChat();

			var pluginOptions = {
				fallbackPollParams:  {
					"latestMessageID": function () { return chat.latestMessageID; } 
				}
			}
			
			var ws = $.gracefulWebSocket("ws://localhost:8080/smartService", pluginOptions);
	
			chat.connect(ws);
		
		})(jQuery);		

 	</script>

</body>
</html>
